#include "my_ostream_iterator.h"
#include "my_istream_iterator.h"
#include <algorithm>
#include <fstream>
#include <iostream>
#include <sstream>
#include <vector>

int main(int argc, char** argv) {
	ofstream f("resultat.txt");
	my_ostream_iterator<int> it1(f, " - ");
	fill_n(it1, 5, 3);
	my_ostream_iterator<int> it2(cout, " - ");
	fill_n(it2, 5, 7);
	cout << endl;
	f << endl;
	istringstream is1("1 2 3 4 5");
	my_ostream_iterator<int> it3(f, " * ");
	partial_sum(my_istream_iterator<int>(is1), my_istream_iterator<int>(), it3);
	istringstream is2("1 2 3 4 5");
	my_ostream_iterator<int> it4(cout, " ");
	partial_sum(my_istream_iterator<int>(is2), my_istream_iterator<int>(), it4);
	cout << endl;
	istringstream is3("6 7 8 9 10 11");
	copy(my_istream_iterator<int>(is3), my_istream_iterator<int>(), it4);
	cout << endl;
	return 0;
}

